package com.tencent.qf.team.controller;

import com.alibaba.fastjson.JSON;
import com.tencent.qf.common.aspect.annotation.ApiLog;
import com.tencent.qf.common.pojo.HttpResult;
import com.tencent.qf.team.dal.DmAppLeaderTaskShareVisit;
import com.tencent.qf.team.dto.request.CommdityCouponsCalculatePriceInfoList;
import com.tencent.qf.team.dto.request.CommdityCouponsValidUniqueIdList;
import com.tencent.qf.team.dto.request.LeaderTaskShareVisitRequest;
import com.tencent.qf.team.dto.response.CommdityCouponsCalculatePriceInfoResponse;
import com.tencent.qf.team.dto.response.CommdityCouponsValidUniqueIdResponse;
import com.tencent.qf.team.service.CommdityCouponsService;
import com.tencent.qf.team.service.LeaderTaskShareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(value = "团长任务分享", tags = "团长任务分享")
public class LeaderTaskShareController {

    @Autowired
    private LeaderTaskShareService leaderTaskShareService;

    @ApiLog("团长任务-查询有效分享数")
    @PostMapping("/api/team/task/share/visit")
    public HttpResult<List<DmAppLeaderTaskShareVisit>> leaderTaskShareVisit(
            @RequestBody LeaderTaskShareVisitRequest request) {
        List<DmAppLeaderTaskShareVisit> data = leaderTaskShareService.leaderTaskShareVisit(request);
        HttpResult<List<DmAppLeaderTaskShareVisit>> result = HttpResult.success(data);
        return result;
    }

}
